<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    /*
      屏幕小于 750px 的时候样式
     */
    @media screen and (max-width: 750px) {

        .box {
            display: flex;
            flex-direction: column;
        }

        .box div {
            width: 100%;
            height: 70px;
            background-color: pink;
            margin: 10px;
        }
    }

    /* 
  屏幕大用 750px的时候的样式

 */
    @media screen and (min-width: 750px) {

        .box {
            display: flex;
            flex-wrap: wrap;
        }

        .box div {
            width: 32%;
            height:200px;
            background-color: red;
            margin: 10px;
        }
    }

    /* 
      默认的样式 变大变小都是这些样式
     */


    body {
        height: 40px;
    }

    .box {
        width: 100%;
        margin: auto;
        padding: 2px;
        height: auto;
        border: 1px solid #000;
    }

    .box div {
        margin: 2px;
    }
</style>

<body>
    <div class="box">
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div> <div></div>
        <div></div>
    </div>
</body>

</html>